//
//  KXPath.h
//  Ghac 4S
//
//  Created by apple on 11-9-7.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#pragma once
#define KP_OPERATOR_REGEX @"\\s*[{>}{<}{==}{>=}{=>}{<=}{=<}{!=}{<>}{LIKE\\[cd\\]}{LIKE}{LIKE\\[c\\]}{LIKE\\[d\\]}]+\\s*"
@interface KXPath : NSObject
{
    NSArray*        m_pathList;
    NSPredicate*    m_predicateKey;
    
}
+(id)kXPathByString:(NSString*)listString       predicate:(NSString*)predicateWord;
-(id)initWithArray:(NSArray*)keyList            predicate:(NSString*)predicateWord;
-(id)initWithString:(NSString *)listString      predicate:(NSString*)predicateWord;


-(NSUInteger)                                   length;
-(NSString*)                                    keyAtIndex:(NSUInteger)index;
-(NSPredicate*)                                 predicatePathAtIndex:(NSUInteger)index;

@property (nonatomic, readonly) NSArray*        keyList;
@property (nonatomic, readonly) NSString*       keyString;
@property (nonatomic, readonly) NSPredicate*    predicate;
@end
